home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00113_Script_completionMenu < prev    next >
Text File  |  1999-04-25  |  3KB  |  118 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14.  
  15. property mySprite, neuName, rolName, Index, selected,¼
  16.           linkedPict,linkedPictNeuName,linkedPictRolName,¼
  17.           linkedField,linkedFieldNeuName,linkedFieldRolName
  18. global process --currently selected process
  19. global city --currently selected city
  20.  
  21.  
  22. on new me
  23.   
  24.   set mySprite = the spriteNum of me
  25.   set selected = 0
  26.   
  27.   --Figure out which menu item is selected and rememnber it
  28.   set neuName = the name of member (the member of sprite mySprite)
  29.   if neuName contains "-rol" then 
  30.     set selected = 1
  31.     set process = getIndex (me)
  32.   end if
  33.   
  34.   if  not selected then
  35.     set rolName = neuName&"-rol"
  36.     set Index = getIndex (me)
  37.     if neuName contains "field" then
  38.       set save = the itemDelimiter
  39.       set the itemDelimiter = "_"
  40.       set linkedPictNeuName = item 2 of neuName
  41.       set the itemDelimiter = save
  42.       set linkedPict = getSpriteNumFromMemberName (linkedPictNeuName)
  43.       set linkedPictRolName = linkedPictNeuName&"-rol"
  44.     end if
  45.   end if
  46.   
  47. end
  48.  
  49. on getIndex me
  50.   set myString = ""
  51.   set NeutralName = getNeutralName (me)
  52.   repeat with i = the Number of Chars in NeutralName down to 1
  53.     set value = integer(char i of NeutralName)
  54.     if not(voidP(value)) then
  55.       set myString = myString&string(value)
  56.     else
  57.       exit repeat
  58.     end if
  59.   end repeat
  60.   return myString
  61. end
  62.  
  63.  
  64. on mouseEnter me
  65.   if not selected then
  66.     if voidP(linkedPict) then
  67.       set the member of sprite mySprite = member  rolName
  68.     else
  69.       set the member of sprite linkedPict = member  linkedPictRolName
  70.     end if
  71.   end if
  72.   puppetsound 3, "subroll"
  73. end
  74.  
  75. on mouseLeave me
  76.   if not selected then
  77.     if voidP(linkedPict) then
  78.       set the member of sprite mySprite = member  neuName
  79.     else
  80.       set the member of sprite linkedPict = member  linkedPictNeuName
  81.     end if
  82.   end if
  83. end
  84.  
  85. on mouseUp me
  86.   if not selected then
  87.     set frameName = city&Index
  88.     go to frame frameName
  89.   end if
  90.   puppetsound 3, "mouse5"
  91. end
  92.  
  93.  
  94. on getNeutralName me
  95.   
  96.   set aMember = the member of sprite mySprite
  97.   set Name = the name of member aMember
  98.   if Name contains "-" then
  99.     repeat with i = the Number of Chars of Name down to 1
  100.       if char i of Name <> "-" then 
  101.         delete char i of Name
  102.       else
  103.         delete char i of Name
  104.         exit repeat
  105.       end if
  106.     end repeat
  107.   end if
  108.   return Name
  109.   
  110. end
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.